package com.wxy.demo.entity;

import cn.hutool.core.util.RandomUtil;

import java.util.Objects;

/**
 * <p>
 *
 * </p>
 *
 * @author e-Xiaoyuan.Wang
 * @since 2022/11/8 16:46
 */
public class UserHash {

    private Integer age;

    private String name;

    private UserHash userHash;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        UserHash userHash1 = (UserHash) o;
        return Objects.equals(age, userHash1.age) && Objects.equals(name, userHash1.name) && Objects.equals(userHash, userHash1.userHash);
    }

    @Override
    public int hashCode() {
//        return Objects.hash(age, name, userHash);
        return RandomUtil.randomInt(1000);
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public UserHash getUserHash() {
        return userHash;
    }

    public void setUserHash(UserHash userHash) {
        this.userHash = userHash;
    }
}
